package words;

import io.ScannerTest;

import java.util.ArrayList;


public class PreList {
	private static String [] awl_list;
	private static String [] prep_list;
	private static PreList prelist;
	private PreList()
	{
		ScannerTest scannertest = new ScannerTest();
		ArrayList<String> arraylist;
		
		
		scannertest.setfilename("awl.txt");
		scannertest.run();
		arraylist = scannertest.getArrayList();
		awl_list = arraylist.toArray(new String[arraylist.size()]);
		scannertest.clear();
		
		scannertest.setfilename("prep.txt");
		scannertest.run();
		arraylist = scannertest.getArrayList();		
		prep_list = arraylist.toArray(new String[arraylist.size()]);
		scannertest.clear();
		
		
	}
	public static PreList getInstance()
	{
		if(prelist == null)
		{
			prelist = new PreList();
			
		}
		return prelist;
	}
	public static final String[] getawl()
	{
		return PreList.awl_list;
	}
	public static final String[] getPrep()
	{
		return PreList.prep_list;
	}
}
